//
//  ExcellentClass.m
//  Courses
//
//  Created by YiXuePxh on 15/5/19.
//  Copyright (c) 2015年 boyibang. All rights reserved.
//

#import "ExcellentClass.h"

@implementation ExcellentClass
-(id)initWithJsonDict:(NSDictionary* )jsonDict{
    if (self = [super init]) {
        self.classPicUrl = jsonDict[@"picName"];
        self.className = jsonDict[@"className"];
        self.teacher = jsonDict[@"teacher"];
        self.classCount = jsonDict[@"classCount"];
        self.classList = jsonDict[@"classList"];
    }
    return self;
}
+(NSMutableArray* )getExcellentDataWithJsonDict:(NSDictionary* )jsonDict{
    NSMutableArray* excellList = [[NSMutableArray alloc]init];
    if ([jsonDict isKindOfClass:[NSArray class]]) {
        for (id json in jsonDict) {
            ExcellentClass* class = [[ExcellentClass alloc]initWithJsonDict:json];
            [excellList addObject:class];
        }
    }
    return excellList;
}
@end
